package apiroute

import (
	"encoding/json"
	"fmt"
	"net/url"
)

func formatMapURL(geojsonFeatures *[]GeoJSONFeature) string {
	bytes, _ := json.Marshal(geojsonFeatures)
	escapedGeoJSON := url.QueryEscape(string(bytes))
	baseURL := "http://geojson.lrdu.org/"
	url := fmt.Sprintf("%s#%s", baseURL, escapedGeoJSON)
	return url
}
